package com.baili.healthsystemserver.service.impl;

import com.baili.healthsystem.domain.User;
import com.baili.healthsystem.domain.request.UserRequest;
import com.baili.healthsystemserver.mapper.SystemMapper;
import com.baili.healthsystemserver.service.SystemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author：ShenJiaFeng
 * @Package：com.baili.healthsystemserver.service.impl
 * @Project：baili-health-cloud
 * @name：UserServiceImpl
 * @Date：2024/5/24 20:00
 */

/**
 * 系统实现层
 */
@Service
public class UserServiceImpl extends ServiceImpl<SystemMapper, User>
        implements SystemService {
    @Autowired
    private SystemMapper systemMapper;

    /**
     * 根据用户姓名 手机号 邮箱发送验证码
     *
     * @param userRequest 根据用户/
     * @return
     */
    @Override
    public User findByUserNameOrUserEmailOrPhoneOrIdCard(UserRequest userRequest) {
        /**
         * 用户信息  手机号/邮箱/身份证号
         */
        return systemMapper.findByUserNameOrUserEmailOrPhoneOrIdCard(userRequest);
    }
}
